<!DOCTYPE html>












  


<html class="theme-next muse use-motion" lang="cn">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2"/>
<meta name="theme-color" content="#222">






  
  
    
      
    
    
      
    
  <script src="//cdn.bootcss.com/pace/1.0.2/pace.min.js"></script>
  <link href="//cdn.bootcss.com/pace/1.0.2/themes/blue/pace-theme-flash.min.css" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />



















  
  
  
  

  
    
    
  

  
    
      
    

    
  

  

  
    
      
    

    
  

  
    
      
    

    
  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic|Monda:300,300italic,400,400italic,700,700italic|Lobster Two:300,300italic,400,400italic,700,700italic|PT Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






  

<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Muse',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>


  




  <meta name="description" content="你在我手心写下旦那！  你觉得是什么的文章？？个人向，搭建个人网盘、笔记、Git服务、SVN服务 环境：  Ubuntu 16.04.1 LTS 64 位 、 CentOS 7.2 64 位">
<meta name="keywords" content="Git,SVN,网盘,Leanote">
<meta property="og:type" content="article">
<meta property="og:title" content="搭建个人向服务系列">
<meta property="og:url" content="https://lengjibo.github.io/搭建个人向服务系列/index.html">
<meta property="og:site_name" content="冷逸的个人博客|开往安河桥北~">
<meta property="og:description" content="你在我手心写下旦那！  你觉得是什么的文章？？个人向，搭建个人网盘、笔记、Git服务、SVN服务 环境：  Ubuntu 16.04.1 LTS 64 位 、 CentOS 7.2 64 位">
<meta property="og:locale" content="cn">
<meta property="og:image" content="https://i.screenshot.net/1dvjjfy">
<meta property="og:image" content="https://i.screenshot.net/vx5kkh3">
<meta property="og:image" content="https://i.screenshot.net/wo3xxb3">
<meta property="og:image" content="https://i.screenshot.net/vp9ggur">
<meta property="og:image" content="https://i.screenshot.net/k95ggip">
<meta property="og:image" content="https://i.screenshot.net/qzlkkfz">
<meta property="og:image" content="https://i.screenshot.net/rygkock">
<meta property="og:image" content="https://i.screenshot.net/96g1vf3">
<meta property="og:image" content="https://i.screenshot.net/n92o0ue">
<meta property="og:image" content="https://i.screenshot.net/6e01dc5">
<meta property="og:image" content="https://i.screenshot.net/zy2wpc5">
<meta property="og:image" content="https://i.screenshot.net/ll2vkfm">
<meta property="og:image" content="https://i.screenshot.net/pr0defx">
<meta property="og:image" content="https://i.screenshot.net/k1247se">
<meta property="og:image" content="https://i.screenshot.net/lo20muo">
<meta property="og:updated_time" content="2019-01-21T09:22:56.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="搭建个人向服务系列">
<meta name="twitter:description" content="你在我手心写下旦那！  你觉得是什么的文章？？个人向，搭建个人网盘、笔记、Git服务、SVN服务 环境：  Ubuntu 16.04.1 LTS 64 位 、 CentOS 7.2 64 位">
<meta name="twitter:image" content="https://i.screenshot.net/1dvjjfy">



  <link rel="alternate" href="/../../.deploy_git/atom.xml" title="冷逸的个人博客|开往安河桥北~" type="application/atom+xml" />




  <link rel="canonical" href="https://lengjibo.github.io/搭建个人向服务系列/"/>



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>搭建个人向服务系列 | 冷逸的个人博客|开往安河桥北~</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="cn">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">冷逸的个人博客|开往安河桥北~</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="Toggle navigation bar">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br />Startseite</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br />Über</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />Tags</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br />Kategorien</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />Archiv</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-book">
    <a href="/book/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-book"></i> <br />book</a>
  </li>

      
      
    </ul>
  

  
    

  

  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://lengjibo.github.io/搭建个人向服务系列/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="冷逸">
      <meta itemprop="description" content="做一个温柔的人...">
      <meta itemprop="image" content="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="冷逸的个人博客|开往安河桥北~">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">搭建个人向服务系列
              
            
          </h1>
        

        <div class="post-meta">
        
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Veröffentlicht am</span>
              

              
                
              

              <time title="Post created: 2019-01-21 14:56:22 / Updated at: 17:22:56" itemprop="dateCreated datePublished" datetime="2019-01-21T14:56:22+08:00">2019-01-21</time>
            

            
              

              
            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">in</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/运维/" itemprop="url" rel="index"><span itemprop="name">运维</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon"
            >
            <i class="fa fa-eye"></i>
             Views:  
            <span class="busuanzi-value" id="busuanzi_value_page_pv" ></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <p>你在我手心写下旦那！</p>
<hr>
<p>你觉得是什么的文章？？个人向，搭建个人网盘、笔记、Git服务、SVN服务</p>
<p>环境：</p>
<blockquote>
<p>Ubuntu 16.04.1 LTS 64 位 、 CentOS 7.2 64 位</p>
</blockquote>
<a id="more"></a>
<h3 id="基于-Ubuntu-搭建个人网盘"><a href="#基于-Ubuntu-搭建个人网盘" class="headerlink" title="基于 Ubuntu 搭建个人网盘"></a>基于 Ubuntu 搭建个人网盘</h3><p>我们这里选择的网盘程序是Seafile。</p>
<blockquote>
<p>Seafile是一个开源、专业、可靠的云存储平台；解决文件集中存储、共享和跨平台访问等问题，由北京海文互知网络有限公司开发，发布于2012年10月；除了一般网盘所提供的云存储以及共享功能外，Seafile还提供消息通信、群组讨论等辅助功能，帮助更好的围绕文件展开协同工作。</p>
</blockquote>
<h4 id="安装环境"><a href="#安装环境" class="headerlink" title="安装环境"></a>安装环境</h4><p>在 Debian/Ubuntu 系统下，可以使用以下命令安装 MySQL：</p>
<blockquote>
<p>sudo apt-get update</p>
<p>sudo apt-get install mysql-server</p>
</blockquote>
<p>安装过程会提示你输入新的root密码，输入一个密码即可</p>
<p>然后安装python依赖</p>
<blockquote>
<p>sudo apt-get install python2.7 python-setuptools python-imaging python-ldap python-mysqldb python-memcache python-urllib3</p>
</blockquote>
<p><img src="https://i.screenshot.net/1dvjjfy" alt=""></p>
<p>为 Seafile 创建一个用户<br>创建 Seafile 用户并设置密码，使用它运行 Seafile 服务：</p>
<blockquote>
<p>sudo useradd -m -s /bin/bash seafile</p>
<p>sudo passwd seafile</p>
</blockquote>
<p><img src="https://i.screenshot.net/vx5kkh3" alt=""></p>
<h4 id="安装Seafile服务器"><a href="#安装Seafile服务器" class="headerlink" title="安装Seafile服务器"></a>安装Seafile服务器</h4><p>切换到新用户，需要输入你刚才为seafile用户设置的密码：</p>
<blockquote>
<p>su - seafile</p>
</blockquote>
<p>切换目录：</p>
<blockquote>
<p>cd ~</p>
</blockquote>
<p>这里可以查看获取最新 Seafile 下载链接，参考以下命令进行下载。</p>
<blockquote>
<p>wget <a href="https://devlab-1251520893.cos.ap-guangzhou.myqcloud.com/seafile-server_6.2.5_x86-64.tar.gz" target="_blank" rel="noopener">https://devlab-1251520893.cos.ap-guangzhou.myqcloud.com/seafile-server_6.2.5_x86-64.tar.gz</a></p>
</blockquote>
<p>解压:</p>
<blockquote>
<p>tar -xzf seafile-server_<em><br>mv seafile-server-</em>/ seafile-server/</p>
</blockquote>
<p><img src="https://i.screenshot.net/wo3xxb3" alt=""></p>
<h4 id="配置Seafile服务器"><a href="#配置Seafile服务器" class="headerlink" title="配置Seafile服务器"></a>配置Seafile服务器</h4><p>运行Seafile设置脚本，并回答预设问题：</p>
<blockquote>
<p>cd seafile-server*<br>./setup-seafile-mysql.sh</p>
</blockquote>
<p>其中：</p>
<p>[ server name ] 字段输入 Seafile。</p>
<p>[ 1 or 2 ] 字段输入 1。</p>
<p>[ This server’s ip or domain ] 字段输入申请的域名或者服务器地址。</p>
<p>mysql 的 [ root password ] 字段输入数据库密码。</p>
<p>[ password for seafile ] 字段输入 seafile 用户密码。</p>
<p>其他字段一路回车使用默认值。</p>
<p><img src="https://i.screenshot.net/vp9ggur" alt=""></p>
<p>注意：Seafile的访问端口为8000</p>
<h4 id="启动Seafile服务器"><a href="#启动Seafile服务器" class="headerlink" title="启动Seafile服务器"></a>启动Seafile服务器</h4><blockquote>
<p>./seafile.sh start<br>./seahub.sh start</p>
</blockquote>
<p><img src="https://i.screenshot.net/k95ggip" alt=""></p>
<p>其中 [ admin email ] 设置为您登录网盘的帐号，如 <a href="mailto:admin@qcloudlab.wang" target="_blank" rel="noopener">admin@qcloudlab.wang</a>。</p>
<p>[ admin password ] 和 [ admin password again ] 设置为登录网盘的密码</p>
<p>至此，搭建完成</p>
<p><img src="https://i.screenshot.net/qzlkkfz" alt=""></p>
<h3 id="搭建个人-Leanote-云笔记本"><a href="#搭建个人-Leanote-云笔记本" class="headerlink" title="搭建个人 Leanote 云笔记本"></a>搭建个人 Leanote 云笔记本</h3><p>蚂蚁笔记，有极客范的云笔记！</p>
<p>前所未有的文档体验，近乎完美的平台覆盖，支持团队协同，企业级私有云</p>
<p>蚂蚁笔记 = 笔记 + 博客 + 协作 + 私有云</p>
<p>啊哈哈哈哈哈哈，他们自己宣传的，我还是搭建吧..</p>
<h4 id="配置环境"><a href="#配置环境" class="headerlink" title="配置环境"></a>配置环境</h4><p>Leanote 依赖 MongoDB 作为数据存储，下面开始安装 MongoDB：</p>
<p>下载解压</p>
<blockquote>
<p>wget <a href="http://labs-1253675457.cosgz.myqcloud.com/mongodb-linux-x86_64-3.0.1.tgz" target="_blank" rel="noopener">http://labs-1253675457.cosgz.myqcloud.com/mongodb-linux-x86_64-3.0.1.tgz</a></p>
<p>tar -xzvf mongodb-linux-x86_64-3.0.1.tgz</p>
</blockquote>
<p><img src="https://i.screenshot.net/rygkock" alt=""></p>
<p>创建用于存储的文件夹目录</p>
<blockquote>
<p>mkdir -p /data/db</p>
</blockquote>
<p>配置 MongoDB 的环境变量：</p>
<p>编辑 /etc/profile，在文件末尾追加以下配置：</p>
<p><code><pre><br>    export PATH=$PATH:/home/mongodb-linux-x86_64-3.0.1/bin<br></pre></code></p>
<p>重启使变量生效</p>
<blockquote>
<p>source /etc/profile</p>
</blockquote>
<p>启动Mongdb</p>
<blockquote>
<p>mongod –bind_ip localhost –port 27017 –dbpath /data/db/ –logpath=/var/log/mongod.log –fork</p>
</blockquote>
<p>这几个参数分别指定ip、端口、日志路径和后台启动</p>
<p><img src="https://i.screenshot.net/96g1vf3" alt=""></p>
<h4 id="安装Leanote"><a href="#安装Leanote" class="headerlink" title="安装Leanote"></a>安装Leanote</h4><p>下载并解压安装包：</p>
<blockquote>
<p>wget <a href="http://labs-1253675457.cosgz.myqcloud.com/leanote-linux-amd64-v2.4.bin.tar.gz" target="_blank" rel="noopener">http://labs-1253675457.cosgz.myqcloud.com/leanote-linux-amd64-v2.4.bin.tar.gz</a></p>
</blockquote>
<blockquote>
<p>tar -zxvf leanote-linux-amd64-v2.4.bin.tar.gz</p>
</blockquote>
<p>编辑 Leanote 配置文件</p>
<p>编辑文件 /home/leanote/conf/app.conf，</p>
<p>在文件中找到 app.secret= 项，并修改为如下内容</p>
<blockquote>
<p>app.secret=qcloud666</p>
</blockquote>
<p>初始化数据库：</p>
<blockquote>
<p>mongorestore -h localhost -d leanote –dir /home/leanote/mongodb_backup/leanote_install_data/</p>
</blockquote>
<p>启动笔记：</p>
<blockquote>
<p>nohup /bin/bash /home/leanote/bin/run.sh &gt;&gt; /var/log/leanote.log 2&gt;&amp;1 &amp;</p>
</blockquote>
<p><img src="https://i.screenshot.net/n92o0ue" alt=""></p>
<p>其实后两步我也不知道啥意思，只是比着教程做，</p>
<p>至此搭建完成</p>
<p>9000端口，默认账号admin密码abc123</p>
<p><img src="https://i.screenshot.net/6e01dc5" alt=""></p>
<h3 id="搭建-Git-服务器"><a href="#搭建-Git-服务器" class="headerlink" title="搭建 Git 服务器"></a>搭建 Git 服务器</h3><p>Git 是一款免费、开源的分布式版本控制系统，用于敏捷高效地处理任何或小或大的项目。</p>
<h4 id="安装依赖"><a href="#安装依赖" class="headerlink" title="安装依赖"></a>安装依赖</h4><blockquote>
<p>yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel</p>
</blockquote>
<p><img src="https://i.screenshot.net/zy2wpc5" alt=""></p>
<blockquote>
<p>yum install gcc perl-ExtUtils-MakeMaker</p>
</blockquote>
<p><img src="https://i.screenshot.net/ll2vkfm" alt=""></p>
<h4 id="安装git"><a href="#安装git" class="headerlink" title="安装git"></a>安装git</h4><blockquote>
<p>wget <a href="https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz" target="_blank" rel="noopener">https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz</a></p>
</blockquote>
<p>解压后编译</p>
<blockquote>
<p>make all prefix=/usr/local/git</p>
</blockquote>
<p>编译完成后, 安装</p>
<blockquote>
<p>make install prefix=/usr/local/git</p>
</blockquote>
<p><img src="https://i.screenshot.net/pr0defx" alt=""></p>
<p>设置变量：</p>
<blockquote>
<p>echo ‘export PATH=$PATH:/usr/local/git/bin’ &gt;&gt; /etc/bashrc</p>
</blockquote>
<blockquote>
<p>source /etc/bashrc</p>
</blockquote>
<p>查看版本</p>
<blockquote>
<p>git –version</p>
</blockquote>
<p><img src="https://i.screenshot.net/k1247se" alt=""></p>
<h4 id="配置git"><a href="#配置git" class="headerlink" title="配置git"></a>配置git</h4><p>创建个目录后初始化这个仓库</p>
<blockquote>
<p>cd /data/repositories/ &amp;&amp; git init –bare test.git</p>
</blockquote>
<p>使用命令”git init –bare”(bare汉语意思是:裸,裸的)初始化的版本库(暂且称为bare repository)只会生成一类文件:用于记录版本库历史记录的.git目录下面的文件;而不会包含实际项目源文件的拷贝;所以该版本库不能称为工作目录(working tree);如果你进入版本目录,就会发现只有.git目录下的文件,而没有其它文件;就是说,这个版本库里面的文件都是.git目录下面的文件,把原本在.git目录里面的文件放在版本库的根目录下面;换句话说,不使用–bare选项时,就会生成.git目录以及其下的版本历史记录文件,这些版本历史记录文件就存放在.git目录下;而使用–bare选项时,不再生成.git目录,而是只生成.git目录下面的版本历史记录文件,这些版本历史记录文件也不再存放在.git目录下面,而是直接存放在版本库的根目录下面</p>
<p>用”git init”初始化的版本库用户也可以在该目录下执行所有git方面的操作。但别的用户在将更新push上来的时候容易出现冲突。</p>
<p>比如有用户在该目录（就称为远端仓库）下执行git操作，且有两个分支(master 和 b1)，当前在master分支下。另一个用户想把自己在本地仓库（就称为本地仓库）的master分支的更新提交到远端仓库的master分支，他就想当然的敲了</p>
<p>git push origin master:master</p>
<p>于是乎出现</p>
<p>因为远端仓库的用户正在master的分支上操作，而你又要把更新提交到这个master分支上，当然就出错了。</p>
<p>但如果是往远端仓库中空闲的分支上提交还是可以的，比如</p>
<p>git push origin master:b1   还是可以成功的</p>
<p>解决办法就是使用”git init –bare”方法创建一个所谓的裸仓库，之所以叫裸仓库是因为这个仓库只保存git历史提交的版本信息，而不允许用户在上面进行各种git操作，如果你硬要操作的话，只会得到下面的错误（”This operation must be run in a work tree”）</p>
<p>这个就是最好把远端仓库初始化成bare仓库的原因。</p>
<p>给 git 仓库目录设置用户和用户组并设置权限</p>
<blockquote>
<p>chown -R gituser:gituser /data/repositories</p>
</blockquote>
<blockquote>
<p>chmod 755 /data/repositories</p>
</blockquote>
<p>查找 git-shell 所在目录,<br>编辑 /etc/passwd 文件，将最后一行关于 gituser 的登录 shell 配置改为 git-shell 的目录如下</p>
<p>如果按照刚才的步骤执行, 这个位置应该是 /usr/local/git/bin/git-shell, 否则请通过 which git-shell 命令查看位置</p>
<p><code><pre><br>    gituser:x:500:500::/home/gituser:/usr/local/git/bin/git-shell<br></pre></code></p>
<p>目的是让gituser通过ssh连接时只是Git-shell</p>
<p><img src="https://i.screenshot.net/lo20muo" alt=""></p>
<p>至此，Git服务已经搭建完毕</p>
<h3 id="svn搭建"><a href="#svn搭建" class="headerlink" title="svn搭建"></a>svn搭建</h3><h4 id="安装-Subversion"><a href="#安装-Subversion" class="headerlink" title="安装 Subversion"></a>安装 Subversion</h4><p>Subversion 是一个版本控制系统，相对于的 RCS 、 CVS ，采用了分支管理系统，它的设计目标就是取代 CVS 。</p>
<p>安装：</p>
<blockquote>
<p>yum install -y subversion</p>
</blockquote>
<p>创建项目库</p>
<blockquote>
<p> mkdir -p /data/svn/myproject<br> svnadmin create /data/svn/myproject</p>
</blockquote>
<h4 id="配置svn"><a href="#配置svn" class="headerlink" title="配置svn"></a>配置svn</h4><p>配置文件简介</p>
<p>版本库中的配置目录 conf 有三个文件:</p>
<p>authz 是权限控制文件</p>
<p>passwd 是帐号密码文件</p>
<p>svnserve.conf 是SVN服务综合配置文件</p>
<p>配置权限配置文件 authz</p>
<p>现在请 编辑 authz ，：</p>
<p><code><pre><br>[groups]<br>用户组<br>admin = admin,root,test<br>用户组所对应的用户<br>[/]<br>库目录权限<br>@admin = rw<br>用户组权限<br>*=r<br>非用户组权限<br></pre></code></p>
<p>编辑 passwd </p>
<p><code><pre><br>[users]<br>admin = 123456<br>root = 123456<br>test = 123456<br></pre></code></p>
<p>编辑 svnserve.conf </p>
<p><code><br>    <pre><br>[general]<br>force-username-case = none<br>匿名访问的权限 可以是read、write，none，默认为read<br>anon-access = none<br>使授权用户有写权限<br>auth-access = write<br>密码数据库的路径<br>password-db = passwd<br>访问控制文件<br>authz-db = authz<br>认证命名空间，SVN会在认证提示里显示，并且作为凭证缓存的关键字<br>realm = /data/svn/myproject<br>[sasl]<br>    </pre><br></code></p>
<h4 id="启动"><a href="#启动" class="headerlink" title="启动"></a>启动</h4><blockquote>
<p>svnserve -d -r /data/svn</p>
</blockquote>
<p>至此完成…</p>

      
    </div>

    

    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
  
  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/搭建个人向服务系列/">搭建个人向服务系列</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 冷逸 的个人博客">冷逸</a></p>
  <p><span>发布时间:</span>2019年01月21日 - 14:01</p>
  <p><span>最后更新:</span>2019年01月21日 - 17:01</p>
  <p><span>原始链接:</span><a href="/搭建个人向服务系列/" title="搭建个人向服务系列">https://lengjibo.github.io/搭建个人向服务系列/</a>
    <span class="copy-path"  title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://lengjibo.github.io/搭建个人向服务系列/"  aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>  
</div>
<script> 
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({   
          title: "",   
          text: '复制成功',
          icon: "success", 
          showConfirmButton: true
          });
    });
    });  
</script>


      
    </div>
    <div>
      
        <div>
    
        <div style="text-align:center;color: #555;font-size:14px;">-------------The End-------------</div>
    
</div>

      
    </div>
    

    
      <div>
        <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
    <span>Donate</span>
  </button>
  <div id="QR" style="display: none;">

    
      <div id="wechat" style="display: inline-block">
        <img id="wechat_qr" src="/images/wechat.png" alt="冷逸 WeChat Pay"/>
        <p>WeChat Pay</p>
      </div>
    

    
      <div id="alipay" style="display: inline-block">
        <img id="alipay_qr" src="/images/zhifubao.jpg" alt="冷逸 Alipay"/>
        <p>Alipay</p>
      </div>
    

    

  </div>
</div>

      </div>
    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Git/" rel="tag"><i class="fa fa-tag"></i> Git</a>
          
            <a href="/tags/SVN/" rel="tag"><i class="fa fa-tag"></i> SVN</a>
          
            <a href="/tags/网盘/" rel="tag"><i class="fa fa-tag"></i> 网盘</a>
          
            <a href="/tags/Leanote/" rel="tag"><i class="fa fa-tag"></i> Leanote</a>
          
        </div>
      

      
      
        <div class="post-widgets">
        

        

        
          
          <div class="social_share">
            
               <div>
                 
  <div class="bdsharebuttonbox">
    <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
    <a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a>
    <a href="#" class="bds_sqq" data-cmd="sqq" title="分享到QQ好友"></a>
    <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
    <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
    <a href="#" class="bds_tieba" data-cmd="tieba" title="分享到百度贴吧"></a>
    <a href="#" class="bds_twi" data-cmd="twi" title="分享到Twitter"></a>
    <a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a>
    <a href="#" class="bds_more" data-cmd="more"></a>
    <a class="bds_count" data-cmd="count"></a>
  </div>
  <script>
    window._bd_share_config = {
      "common": {
        "bdText": "",
        "bdMini": "2",
        "bdMiniList": false,
        "bdPic": ""
      },
      "share": {
        "bdSize": "16",
        "bdStyle": "0"
      },
      "image": {
        "viewList": ["tsina", "douban", "sqq", "qzone", "weixin", "twi", "fbook"],
        "viewText": "分享到：",
        "viewSize": "16"
      }
    }
  </script>

<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

               </div>
            
            
          </div>
        
        </div>
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/ftp服务器搭建/" rel="next" title="ftp服务器搭建">
                <i class="fa fa-chevron-left"></i> ftp服务器搭建
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/hgame2019解题记录/" rel="prev" title="hgame2019解题记录">
                hgame2019解题记录 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Inhaltsverzeichnis
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Übersicht
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="http://ww1.sinaimg.cn/large/007F8GgBly1g7vony4ltaj308w08wq30.jpg"
                alt="冷逸" />
            
              <p class="site-author-name" itemprop="name">冷逸</p>
              <p class="site-description motion-element" itemprop="description">做一个温柔的人...</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">113</span>
                    <span class="site-state-item-name">Artikel</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">19</span>
                    <span class="site-state-item-name">Kategorien</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">120</span>
                    <span class="site-state-item-name">Tags</span>
                  </a>
                </div>
              
            </nav>
          

          
            <div class="feed-link motion-element">
              <a href="/../../.deploy_git/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
              
                <span class="links-of-author-item">
                  <a href="https://github.com/lengjibo" target="_blank" title="GitHub"><i class="fa fa-fw fa-globe"></i>GitHub</a>
                  
                </span>
              
                <span class="links-of-author-item">
                  <a href="qqlengyi@163.com" target="_blank" title="E-Mail"><i class="fa fa-fw fa-globe"></i>E-Mail</a>
                  
                </span>
              
            </div>
          
        <div id="music163player">
            <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=110 src="https://music.163.com/outchain/player?type=0&id=377079922&auto=1&height=90"></iframe>
          </div>
          
          

          
          
            <div class="links-of-blogroll motion-element links-of-blogroll-block">
              <div class="links-of-blogroll-title">
                <i class="fa  fa-fw fa-link"></i>
                友情链接
              </div>
              <ul class="links-of-blogroll-list">
                
                  <li class="links-of-blogroll-item">
                    <a href="https://sqlmap.wiki/" title="青春's blog" target="_blank">青春's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.addon.pub/" title="Yokeen's blog" target="_blank">Yokeen's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://freeerror.org/" title="之乎者也's blog" target="_blank">之乎者也's blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.bugbank.cn/team/FrigidSword" title="漏洞银行" target="_blank">漏洞银行</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.vulbox.com/team/Frigid%20Sword%E5%AE%89%E5%85%A8%E5%9B%A2%E9%98%9F" title="漏洞盒子" target="_blank">漏洞盒子</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://godpang.github.io/" title="Mr.赵" target="_blank">Mr.赵</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://amliaw4.github.io/" title="amliaW4'S Blog" target="_blank">amliaW4'S Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://www.se7ensec.cn/" title="se7en's Blog" target="_blank">se7en's Blog</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="https://ninjia.gitbook.io/secskill/" title="secskill" target="_blank">secskill</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://www.bug1024.cn/" title="ibug" target="_blank">ibug</a>
                  </li>
                
                  <li class="links-of-blogroll-item">
                    <a href="http://wwcx.org/" title="Strjziny's Blog" target="_blank">Strjziny's Blog</a>
                  </li>
                
              </ul>
            </div>
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#基于-Ubuntu-搭建个人网盘"><span class="nav-number">1.</span> <span class="nav-text">基于 Ubuntu 搭建个人网盘</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装环境"><span class="nav-number">1.1.</span> <span class="nav-text">安装环境</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#安装Seafile服务器"><span class="nav-number">1.2.</span> <span class="nav-text">安装Seafile服务器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置Seafile服务器"><span class="nav-number">1.3.</span> <span class="nav-text">配置Seafile服务器</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#启动Seafile服务器"><span class="nav-number">1.4.</span> <span class="nav-text">启动Seafile服务器</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#搭建个人-Leanote-云笔记本"><span class="nav-number">2.</span> <span class="nav-text">搭建个人 Leanote 云笔记本</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#配置环境"><span class="nav-number">2.1.</span> <span class="nav-text">配置环境</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#安装Leanote"><span class="nav-number">2.2.</span> <span class="nav-text">安装Leanote</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#搭建-Git-服务器"><span class="nav-number">3.</span> <span class="nav-text">搭建 Git 服务器</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装依赖"><span class="nav-number">3.1.</span> <span class="nav-text">安装依赖</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#安装git"><span class="nav-number">3.2.</span> <span class="nav-text">安装git</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置git"><span class="nav-number">3.3.</span> <span class="nav-text">配置git</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#svn搭建"><span class="nav-number">4.</span> <span class="nav-text">svn搭建</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#安装-Subversion"><span class="nav-number">4.1.</span> <span class="nav-text">安装 Subversion</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#配置svn"><span class="nav-number">4.2.</span> <span class="nav-text">配置svn</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#启动"><span class="nav-number">4.3.</span> <span class="nav-text">启动</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; 2014 – <span itemprop="copyrightYear">2020</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">冷逸</span>

  

  
</div>




  <div class="powered-by">Erstellt mit  <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> v3.7.1</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Muse</a> v6.4.0</div>






        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="Total Visitors">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="Total Views">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  







  
  







  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.jsdelivr.net/velocity/1.2.3/velocity.ui.min.js"></script>
  

  
  
    <script type="text/javascript" src="//cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/three.min.js"></script>
  

  
  
    <script type="text/javascript" src="/lib/three/canvas_sphere.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  





  

  

  

  

  
  

  

  

  

  

  

<script src="/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"log":false,"pluginJsPath":"lib/","pluginModelPath":"assets/","pluginRootPath":"live2dw/","tagMode":false});</script></body>
</html>
<script type="text/javascript" src="/js/src/love.js"></script>
